#ifndef _AUDIO_PLAY_H_
#define _AUDIO_PLAY_H_
#include "hi_type.h"


#if 1
typedef enum hiAUDIO_SAMPLE_RATE_E 
{ 
    AUDIO_SAMPLE_RATE_8000   = 8000,    /* 8K samplerate*/
    AUDIO_SAMPLE_RATE_12000  = 12000,   /* 12K samplerate*/    
    AUDIO_SAMPLE_RATE_11025  = 11025,   /* 11.025K samplerate*/
    AUDIO_SAMPLE_RATE_16000  = 16000,   /* 16K samplerate*/
    AUDIO_SAMPLE_RATE_22050  = 22050,   /* 22.050K samplerate*/
    AUDIO_SAMPLE_RATE_24000  = 24000,   /* 24K samplerate*/
    AUDIO_SAMPLE_RATE_32000  = 32000,   /* 32K samplerate*/
    AUDIO_SAMPLE_RATE_44100  = 44100,   /* 44.1K samplerate*/
    AUDIO_SAMPLE_RATE_48000  = 48000,   /* 48K samplerate*/
    AUDIO_SAMPLE_RATE_BUTT,
} AUDIO_SAMPLE_RATE_E; 

typedef enum hiAUDIO_BIT_WIDTH_E
{
    AUDIO_BIT_WIDTH_8   = 0,   /* 8bit width */
    AUDIO_BIT_WIDTH_16  = 1,   /* 16bit width*/
    AUDIO_BIT_WIDTH_24  = 2,   /* 24bit width*/
    AUDIO_BIT_WIDTH_BUTT,
} AUDIO_BIT_WIDTH_E;

typedef enum hiAIO_SOUND_MODE_E
{
    AUDIO_SOUND_MODE_MONO   =0,/*mono*/
    AUDIO_SOUND_MODE_STEREO =1,/*stereo*/
    AUDIO_SOUND_MODE_BUTT    
} AUDIO_SOUND_MODE_E;
#else
# include "hi_comm_aio.h"
#endif
typedef struct playinfo
{
    HI_CHAR filename[128];
    AUDIO_SAMPLE_RATE_E samplerate;
    AUDIO_BIT_WIDTH_E  bitwidth;
    AUDIO_SOUND_MODE_E soundmode;
    HI_S32 volum;/*-121____6 if bigger than 6 the sound may distortion*/
    HI_S32 playmode;
}myplayinfo;

//HI_S32 HI_INIT_MPP();

HI_S32 HI_Init_Audio(myplayinfo info);


HI_S32 HI_Audio_Wav_Play(myplayinfo info);

HI_S32 HI_Audio_Wav_Stop();

HI_S32 HI_Audio_Set_Volum(HI_S32 volum);

HI_S32 HI_Audio_Get_Playstatus();

HI_S32 HI_Audio_Set_Playmode(HI_S32 playmode);

int fb_init(int width, int height);
#endif
